import { httpTwo } from '@/utils/http/axios';
import qs from 'qs';
// 获取用户账号列表
export function getAccountList(params, query) {
  return httpTwo.request({
    url: '/account/list?' + qs.stringify({ ...query, type: 2 }),
    method: 'POST',
    params,
  });
}

// 删除账号
export function delAccount(params) {
  const { ids } = params;
  return httpTwo.request({
    url: `/account/${ids}`,
    method: 'delete',
  });
}

// 切换账号状态
export function toggleAccount(params, query) {
  const { id } = params;
  return httpTwo.request({
    url: `/account/${id}/use`,
    method: 'get',
    params: query,
  });
}
